<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f = "http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"  
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>Edit-RefPortal</title>
    </h:head> 
    <h:body> 
        <ui:composition template="./BannersAndMenusTemplate.jsf">

            <ui:define name="content">
                <h:form id="form" rendered="#{user.getlogin()}">
                    <p:panel header="Edit Author">  
                        
                        <h:panelGrid columns="2">    
                            <h:outputLabel  value="Name: *" />  
                            <h:inputText value = "#{user.selectedAuthor.name}"/>     
                            
                            <h:outputLabel  value="Surname: *" />  
                            <h:inputText value = "#{user.selectedAuthor.surname}"/>
                            

                        </h:panelGrid>    

                        <p style="color:blue">*Additional names*</p>
                        <h:panelGrid columns="2" id="matchGrid">
                            
                            <h:outputLabel  value="Name 1: "  />  
                            <h:inputText value = "#{user.aname1}" required="false"  />
                            
                            <h:outputLabel  value="Name 2: " />     
                            <h:inputText value = "#{user.aname2}" required="false"  /> 
                            
                            <h:outputLabel  value="Name 3: " />  
                            <h:inputText value = "#{user.aname3}" required="false" />
                            
                            <h:outputLabel  value="Name 4: " />  
                            <h:inputText value = "#{user.aname4}" required="false" /> 
                            
                            <h:outputLabel  value="Name 5: " />  
                            <h:inputText value = "#{user.aname5}" required="false" /> 
                            
                        </h:panelGrid>  

                        <p:commandButton id="saveButton"   value="Apply" action = "#{user.editAuthor}"/>  

                    </p:panel>      
                </h:form>
                <h:form rendered="#{user.login2}"> 
                    <a href="login.jsf">please log in again</a>
                </h:form>
            </ui:define>

        </ui:composition>


    </h:body>

</html>

